home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Replacements / cpdist_0_17.lha / cpdist-0.17 / source / getkey.h < prev    next >
C/C++ Source or Header  |  1994-06-06  |  1KB  |  53 lines

  1. /*
  2.  *  GETKEY.H
  3.  *
  4.  *  (c)Copyright 1990 by Tobias Ferber,  All Rights Reserved.
  5.  */
  6.  
  7. #ifndef GETKEY_H
  8. #define GETKEY_H
  9.  
  10. /* The prototype */
  11.  
  12. #if defined (__STDC__) || defined (__cplusplus)
  13. extern int getkey(void);
  14. #else /* !(__STDC__ || __cplusplus) */
  15. extern int getkey();
  16. #endif /* __STDC__ || __cplusplus */
  17.  
  18. /*
  19.  * Some compilers come up with their own getkey() routines.
  20.  * Please feel free to add them in here:
  21.  */
  22.  
  23. #ifdef __TURBOC__
  24. #include <conio.h>
  25. #define getkey() getch()
  26. #endif /* __TURBOC__ */
  27.  
  28. /*
  29.  * Some machines can read from non-buffered stdin. (e.g. MS-DOS machines
  30.  * can do so if "con" is opened in _binary_ mode.)
  31.  * If so, please add your console ``file'' name in here:
  32.  */
  33.  
  34. #if defined(__MSDOS__) || defined(GNUDOS)
  35. #define CONSOLENAME "con"
  36.  
  37. #elif defined(AMIGA)
  38.  
  39. /* The name parameter for Amiga dos.library's Open() can be "*",
  40.  * representing current window.  Note that as of V36, "*" is obsolete,
  41.  * and CONSOLE: should be used instead.
  42.  */
  43.  
  44. #define CONSOLENAME "*"
  45.  
  46. #elif defined(MINT)
  47. #define CONSOLENAME "/dev/tty"
  48.  
  49. #endif /* machines and their console names */
  50.  
  51.  
  52. #endif /* !GETKEY_H */
  53.